//
//  BaseTableViewCell.m
//  mike2.0
//
//  Created by mike on 15/9/7.
//  Copyright (c) 2015年 flychi. All rights reserved.
//

#import "BaseTableViewCell.h"

@implementation BaseTableViewCell

#pragma mark - Life cycle

- (void)baseSetup {
    self.imageView.image = nil;
    self.imageView.hidden = YES;
    self.textLabel.text = nil;
    self.textLabel.hidden = YES;
    self.detailTextLabel.text = nil;
    self.detailTextLabel.hidden = YES;
}

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        [self baseSetup];
        [self initViews];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    [self baseSetup];
    [self initViews];
}

#pragma mark - SubViews UI

- (void)initViews{
    // subClass
}

#pragma mark - Public Methods

- (void)loadCellData:(id)data{
    // subClass
}

- (void)loadCellData:(id)data indexPath:(NSIndexPath *)indexPath{
    // subClass
}

- (void)setZero{
    if ([self respondsToSelector:@selector(setSeparatorInset:)]) {
        [self setSeparatorInset:UIEdgeInsetsZero];
    }
    if ([self respondsToSelector:@selector(setLayoutMargins:)]) {
        [self setLayoutMargins:UIEdgeInsetsZero];
    }
}

@end
